<template>
  <view class="merchantsCard" @tap="todetail">
    <view class="viewimg">
      <image :src="image(data.face_image_id)" alt="" srcset="" class="img" />
      <view class="category">{{ data.business_type_id.name }}</view>
    </view>
    <view class="text">
      <view class="title">{{ data.name }}</view>
      <view class="ranking">{{ data.short_note }}</view>
    </view>
  </view>
</template>

<script>
// 商家推荐卡片
import "./index.scss";
import Taro from "@tarojs/taro";
import {getImage} from "../../utils/request"

export default {
  props: ["data"],
  data() {
    return {
      msg: "Hello33333 world!",
    };
  },
  mounted() {
    console.log(this.data,'3322');
  },
  methods:{
    todetail() {
      // console.log(this.data, "ooo");
      Taro.navigateTo({
        url: `/pages/merchantlist/detail/index?id=${this.data._id}`,
      });
      // `../../pages/HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.srcId}`
    },

    image(id){
      return getImage(id)
    }
  }
};
</script>
